import { House3DDesignAppService } from './House3DDesignAppService'
import { CanvasControllAppService } from './CanvasControllAppService'
import { GlobalContainer } from '../common/GlobalContainer'
import { GuiApplication } from './test/GuiApplication'

export class HouseApplication {
  ///#region  控制模块
  public canvasControllAppService: CanvasControllAppService
  public houseDesignAppService: House3DDesignAppService
  public guiApplication: GuiApplication

  ///#endregion 控制模块
  public constructor() {
    GlobalContainer.initGlobalForThree()

    // 加载控制器
    this.canvasControllAppService = new CanvasControllAppService()
    this.houseDesignAppService = new House3DDesignAppService()
    this.guiApplication = GuiApplication.getInstance()
    // this.loadAllControllers()
  }

  /** 初始化房屋设计场景
   * @param canvasContainer
   */
  public initHouseDesignScene3D(canvasContainer: HTMLDivElement) {
    this.canvasControllAppService.initViewport3D(canvasContainer)
  }

  public test() {
    this.houseDesignAppService.testTextureAlign()
  }
}
